﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Tradex.Trading;

namespace Tradex.Tests.Trading {
    
    /// <summary>
    /// Tests teh functionality of a TradeUpate
    /// </summary>
    [TestClass]
    public class TradeUpdateTests {

        /// <summary>
        ///A test for TradeUpdate Constructor
        ///</summary>
        [TestMethod()]
        public void Constructor() {
            int position = 55;
            double entryAverage = 22.234F;
            double exitAverage = 21.443F;
            TradeUpdate target = new TradeUpdate(position, entryAverage, exitAverage);
            Assert.AreEqual(target.Position, position);
            Assert.AreEqual(target.EntryAverage, entryAverage);
            Assert.AreEqual(target.ExitAverage, exitAverage);
        }

    }
}
